File: Perl.xs

package info (click to toggle)
libdbi-perl 1.647-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,036 kB
  • sloc: perl: 18,860; ansic: 609; makefile: 30; cpp: 4
file content (54 lines) | stat: -rw-r--r-- 1,681 bytes parent folder | download | duplicates (4)
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
/* This is a skeleton driver that only serves as a basic sanity check
   that the Driver.xst mechansim doesn't have compile-time errors in it.
   vim: ts=8:sw=4:expandtab
*/

#define PERL_NO_GET_CONTEXT
#include "DBIXS.h"
#include "dbd_xsh.h"

#undef DBIh_SET_ERR_CHAR        /* to syntax check emulation */
#include "dbivport.h"

DBISTATE_DECLARE;


struct imp_drh_st {
    dbih_drc_t com;     /* MUST be first element in structure   */
};
struct imp_dbh_st {
    dbih_dbc_t com;     /* MUST be first element in structure   */
};
struct imp_sth_st {
    dbih_stc_t com;     /* MUST be first element in structure   */
};



#define dbd_discon_all(drh, imp_drh)            (drh=drh,imp_drh=imp_drh,1)
#define dbd_dr_data_sources(drh, imp_drh, attr) (drh=drh,imp_drh=imp_drh,attr=attr,Nullav)
#define dbd_db_do4_iv(dbh,imp_dbh,p3,p4)        (dbh=dbh,imp_dbh=imp_dbh,(void*)p3,p4=p4,-2)
#define dbd_db_last_insert_id(dbh, imp_dbh, p3,p4,p5,p6, attr) \
        (dbh=dbh,imp_dbh=imp_dbh,p3=p3,p4=p4,p5=p5,p6=p6,attr=attr,&PL_sv_undef)
#define dbd_take_imp_data(h, imp_xxh, p3)       (h=h,imp_xxh=imp_xxh,&PL_sv_undef)
#define dbd_st_execute_for_fetch(sth, imp_sth, p3, p4) \
        (sth=sth,imp_sth=imp_sth,p3=p3,p4=p4,&PL_sv_undef)

#define dbd_st_bind_col(sth, imp_sth, param, ref, sql_type, attribs) \
        (sth=sth,imp_sth=imp_sth,param=param,ref=ref,sql_type=sql_type,attribs=attribs,1)

int     /* just to test syntax of macros etc */
dbd_st_rows(SV *h, imp_sth_t *imp_sth)
{
    dTHX;
    PERL_UNUSED_VAR(h);
    DBIh_SET_ERR_CHAR(h, imp_sth, 0, 1, "err msg", "12345", Nullch);
    return -1;
}


MODULE = DBD::Perl    PACKAGE = DBD::Perl

INCLUDE: Perl.xsi

# vim:sw=4:ts=8