diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-10-21 12:18:35 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-10-21 12:20:22 +0100 |
commit | 157486ae134392a41a6884224e32acc8dc9ed2f5 (patch) | |
tree | eb8b75d3f55969fb9032670741739c8631e90c2b | |
parent | ad1de9c6347c3e74fab7b1675e069dfc8b67d44c (diff) | |
download | perl-157486ae134392a41a6884224e32acc8dc9ed2f5.tar.gz |
SDBM_File::{error,clearerr} can be implemented as XS ALIASes.
-rw-r--r-- | ext/SDBM_File/SDBM_File.xs | 15 |
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 |