X-Git-Url: http://git.indexdata.com/?p=simpleserver-moved-to-github.git;a=blobdiff_plain;f=SimpleServer.xs;h=862ef215bf1da20b287c592127ecec4792883d9a;hp=44384f717de18214cf01eec5adf6b357477432cc;hb=9b13b58a1a66c49129153960bc0f578b6e0a9e20;hpb=a7033446d8ca83a1ac658e069b9d923d55c3d53d diff --git a/SimpleServer.xs b/SimpleServer.xs index 44384f7..862ef21 100644 --- a/SimpleServer.xs +++ b/SimpleServer.xs @@ -1,5 +1,5 @@ /* - * $Id: SimpleServer.xs,v 1.34 2004-09-03 13:27:19 mike Exp $ + * $Id: SimpleServer.xs,v 1.36 2006-01-30 21:29:41 adam Exp $ * ---------------------------------------------------------------------- * * Copyright (c) 2000-2004, Index Data. @@ -442,6 +442,7 @@ static SV *rpn2perl(Z_RPNStructure *s) Z_Operand *o = s->u.simple; Z_AttributesPlusTerm *at; if (o->which == Z_Operand_resultSetId) { + SV *sv2; /* This code causes a SIGBUS on my machine, and I have no idea why. It seems as clear as day to me */ char *rsid = (char*) o->u.resultSetId; @@ -449,7 +450,7 @@ static SV *rpn2perl(Z_RPNStructure *s) sv = newObject("Net::Z3950::RPN::RSID", (SV*) (hv = newHV())); printf("Made sv=0x%lx, hv=0x%lx\n", (unsigned long) sv ,(unsigned long) hv); - SV *sv2 = newSVpv(rsid, strlen(rsid)); + sv2 = newSVpv(rsid, strlen(rsid)); setMember(hv, "id", sv2); printf("Set hv{id} to 0x%lx\n", (unsigned long) sv2); return sv; @@ -1441,3 +1442,11 @@ ScanPartial() RETVAL +void +yazlog(arg) + SV *arg + CODE: + STRLEN len; + char *ptr; + ptr = SvPV(arg, len); + yaz_log(YLOG_LOG, "%.*s", len, ptr);