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 SV contains a string since the value returned is is (can be) larger than an int. It would be nice, in the case of AMD64 / perl compiled with 64 bit ints, to return an sviv rather than a svpv. > 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 of 'override' of default behaviour. You override the default behaviour by overriding the default rows in mysql.xs (I think). The problem with doing this is, however, that xsubpp then complains about the dup function. Humm, now that I think of it, if you really want to get rid of the warning, you can do some #define hackery viz.: #define foobar rows void foobar(sth) SV* sth CODE: ... The above should make subpp happy and should get rid of the dup function warning. Rudy