summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-10-21 12:18:35 +0100
committerNicholas Clark <nick@ccl4.org>2010-10-21 12:20:22 +0100
commit157486ae134392a41a6884224e32acc8dc9ed2f5 (patch)
treeeb8b75d3f55969fb9032670741739c8631e90c2b
parentad1de9c6347c3e74fab7b1675e069dfc8b67d44c (diff)
downloadperl-157486ae134392a41a6884224e32acc8dc9ed2f5.tar.gz
SDBM_File::{error,clearerr} can be implemented as XS ALIASes.
-rw-r--r--ext/SDBM_File/SDBM_File.xs15
1 files changed, 5 insertions, 10 deletions
diff --git a/ext/SDBM_File/SDBM_File.xs b/ext/SDBM_File/SDBM_File.xs
index 23d86b5717..0c139fffa5 100644
--- 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