ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/PApp-SQL/SQL.xs
(Generate patch)

Comparing PApp-SQL/SQL.xs (file contents):
Revision 1.15 by root, Thu Nov 7 01:57:58 2002 UTC vs.
Revision 1.19 by root, Sat Jan 19 07:38:52 2008 UTC

62#define lru_init lru_list.next = &lru_list; lru_list.prev = &lru_list /* other fields are zero */ 62#define lru_init lru_list.next = &lru_list; lru_list.prev = &lru_list /* other fields are zero */
63 63
64/* this is primitive, yet effective */ 64/* this is primitive, yet effective */
65/* the returned value must never be zero (or bad things will happen) */ 65/* the returned value must never be zero (or bad things will happen) */
66#define lru_hash do { \ 66#define lru_hash do { \
67 hash = (((U32)dbh)>>2); \ 67 hash = (((U32)(long)dbh)>>2); \
68 hash += *statement;\ 68 hash += *statement;\
69 hash += len; \ 69 hash += len; \
70} while (0) 70} while (0)
71 71
72/* fetch and "use" */ 72/* fetch and "use" */
337 { 337 {
338 PUSHMARK (SP); 338 PUSHMARK (SP);
339 EXTEND (SP, bind_last - bind_first + 2); 339 EXTEND (SP, bind_last - bind_first + 2);
340 PUSHs (sth); 340 PUSHs (sth);
341 do { 341 do {
342#if CAN_UTF8
343 if (ix & 1)
344 SvUTF8_on (SvRV(ST(bind_first)));
345#endif
342 PUSHs (ST(bind_first)); 346 PUSHs (ST(bind_first));
343 bind_first++; 347 bind_first++;
344 } while (bind_first != bind_last); 348 } while (bind_first != bind_last);
345 349
346 PUTBACK; 350 PUTBACK;
350 if (count != 1) 354 if (count != 1)
351 croak ("sql_exec: bind_columns() didn't return any value ('%s'): %s", 355 croak ("sql_exec: bind_columns() didn't return any value ('%s'): %s",
352 SvPV (sql, dc), 356 SvPV (sql, dc),
353 SvPV (get_sv ("DBI::errstr", TRUE), dd)); 357 SvPV (get_sv ("DBI::errstr", TRUE), dd));
354 358
355 if (!SvOK (POPs)) 359 if (!SvOK (TOPs))
356 croak ("sql_exec: bind_columns() didn't return a true ('%s'): %s", 360 croak ("sql_exec: bind_columns() didn't return a true ('%s'): %s",
357 SvPV (sql, dc), 361 SvPV (sql, dc),
358 SvPV (get_sv ("DBI::errstr", TRUE), dd)); 362 SvPV (get_sv ("DBI::errstr", TRUE), dd));
363
359 } 364 POPs;
365 }
360 366
361 /* free our arguments from the stack */ 367 /* restore our arguments again */
362 SP -= items; 368 SP -= items;
363 369
364 if ((ix & ~1) == 2) 370 if ((ix & ~1) == 2)
365 { /* sql_fetch */ 371 { /* sql_fetch */
366 SV *row; 372 SV *row;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines