projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad1de9c
)
SDBM_File::{error,clearerr} can be implemented as XS ALIASes.
author
Nicholas Clark
<nick@ccl4.org>
Thu, 21 Oct 2010 11:18:35 +0000
(12:18 +0100)
committer
Nicholas Clark
<nick@ccl4.org>
Thu, 21 Oct 2010 11:20:22 +0000
(12:20 +0100)
ext/SDBM_File/SDBM_File.xs
patch
|
blob
|
history
diff --git
a/ext/SDBM_File/SDBM_File.xs
b/ext/SDBM_File/SDBM_File.xs
index
23d86b5
..
0c139ff
100644
(file)
--- a/
ext/SDBM_File/SDBM_File.xs
+++ b/
ext/SDBM_File/SDBM_File.xs
@@
-106,20
+106,15
@@
sdbm_NEXTKEY(db, key)
int
sdbm_error(db)
SDBM_File db
+ ALIAS:
+ sdbm_clearerr = 1
+ PREINIT:
+ dXSI32;
CODE:
- RETVAL = sdbm_error(db->dbp) ;
- OUTPUT:
- RETVAL
-
-int
-sdbm_clearerr(db)
- SDBM_File db
- CODE:
- RETVAL = sdbm_clearerr(db->dbp) ;
+ RETVAL = ix ? sdbm_clearerr(db->dbp) : sdbm_error(db->dbp);
OUTPUT:
RETVAL
-
SV *
filter_fetch_key(db, code)
SDBM_File db