-
Notifications
You must be signed in to change notification settings - Fork 0
/
Unify.xs
58 lines (46 loc) · 1.12 KB
/
Unify.xs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* Copyright (c) 1994,1995,1996,1997 Tim Bunce
* Modified for DBD::Unify by H.Merijn Brand <[email protected]>
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the Perl README file.
*/
#include "Unify.h"
DBISTATE_DECLARE;
MODULE = DBD::Unify PACKAGE = DBD::Unify
void
_uni2sql_type (x)
IV x
CODE:
XST_mIV (0, uni2sql_type (x));
INCLUDE: Unify.xsi
MODULE = DBD::Unify PACKAGE = DBD::Unify::db
void
_do (dbh, statement, attribs = "", params = NULL)
SV * dbh
char * statement
char * attribs
SV * params
PREINIT:
int retval;
CODE:
retval = dbd_db_do (dbh, statement);
if (retval < 0) {
XST_mUNDEF (0); /* error */
}
else if (retval == 0) {
XST_mPV (0, "0E0"); /* true but zero */
}
else {
XST_mIV (0, retval); /* rowcount: NYI */
}
void
db_dict (dbh, reload = 0)
SV * dbh
int reload
PPCODE:
dbd_db_dict (dbh, reload);
EXTEND (SP, 1);
ST (0) = DEFSV;
XSRETURN (1);
MODULE = DBD::Unify PACKAGE = DBD::Unify::st
# end of Unify.xs