Re: Question about moving a function from mysql.xs to dbdimp.c

2005-04-17 Thread Jochen Wiedmann
Jonathan Leffler wrote: > int > dbd_ix_st_rows(SV *sth, imp_sth_t *imp_sth) > { > return(imp_sth->n_rows); > } > > I've not seen any warnings... Jonathan, as Patrick has already pointed out, one cannot always expect that the number of rows allows a representation in int format. In other wor

Re: Question about moving a function from mysql.xs to dbdimp.c

2005-04-16 Thread Jonathan Leffler
On 4/15/05, Rudy Lippan <[EMAIL PROTECTED]> wrote: > On Fri, 15 Apr 2005, Tim wrote: > > > > #define foobar rows > > > void > > > foobar(sth) > > > SV* sth > > > CODE: > > > ... > > > > > > The above should make subpp happy and should get rid of the dup function > > > warning. > > > > I susp

Re: Question about moving a function from mysql.xs to dbdimp.c

2005-04-15 Thread Tim
On Fri, Apr 15, 2005 at 03:59:23PM -0400, Rudy Lippan wrote: > On Fri, 15 Apr 2005, Patrick Galbraith wrote: > > > What about how to deal with returning values (my_ulonglong) that are > > larger than the default defined value of dbd_st_rows from DBI (int) ? > > Well, in Driver.xst (mysql.xst) d

Re: Question about moving a function from mysql.xs to dbdimp.c

2005-04-15 Thread Tim
On Fri, Apr 15, 2005 at 12:30:55PM -0700, Patrick Galbraith wrote: > Rudy, > > What about how to deal with returning values (my_ulonglong) that are > larger than the default defined value of dbd_st_rows from DBI (int) ? Actually an IV, which may be 64bit if perl is configured that way. > How d

Re: Question about moving a function from mysql.xs to dbdimp.c

2005-04-15 Thread Rudy Lippan
On Fri, 15 Apr 2005, Tim wrote: > > #define foobar rows > > void > > foobar(sth) > > SV* sth > > CODE: > > ... > > > > The above should make subpp happy and should get rid of the dup function > > warning. > > I suspect that won't work, sadly, as xsubpp uses the name to generate > some C co

Re: Question about moving a function from mysql.xs to dbdimp.c

2005-04-15 Thread Rudy Lippan
On Fri, 15 Apr 2005, Patrick Galbraith wrote: > What about how to deal with returning values (my_ulonglong) that are > larger than the default defined value of dbd_st_rows from DBI (int) ? Well, in Driver.xst (mysql.xst) dbd_st_rows returns void and sticks an SV on the stack, in this case the

Re: Question about moving a function from mysql.xs to dbdimp.c

2005-04-15 Thread Patrick Galbraith
Rudy, What about how to deal with returning values (my_ulonglong) that are larger than the default defined value of dbd_st_rows from DBI (int) ? How do you ensure you can handle differently than the default rows? (like now how it's done with 'sprintf(buf, "%llu")' ? It seems you need some sort

Re: Question about moving a function from mysql.xs to dbdimp.c

2005-04-15 Thread Rudy Lippan
On Fri, 15 Apr 2005, Philip M. Gollucci wrote: > >#ifdef false > >void dbd_st_rows() {...} > >#endif > > > > > newer compiles should also optimize: particularly gcc > > if (false) { > } > > out > Maybe I am missing something here, but what does optimizing out if blocks have to do with

Re: Question about moving a function from mysql.xs to dbdimp.c

2005-04-15 Thread Philip M. Gollucci
Rudy Lippan wrote: On Thu, 14 Apr 2005, Patrick Galbraith wrote: Tim, For the longest time, there's been this annoying warning with the compile for DBD::mysql: cc -c -I/Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI/ -I/usr/local/mysql/include -fno-omit-frame-pointer -DDBD_MYSQL_INS

Re: Question about moving a function from mysql.xs to dbdimp.c

2005-04-15 Thread Rudy Lippan
On Thu, 14 Apr 2005, Patrick Galbraith wrote: > Tim, > > For the longest time, there's been this annoying warning with the > compile for DBD::mysql: > > cc -c -I/Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI/ > -I/usr/local/mysql/include -fno-omit-frame-pointer > -DDBD_MYSQL_INSERT_