cvsuser 04/01/02 13:22:19
Modified: build_tools build_nativecall.pl
src utils.c
Log:
More changes triggered by the postgres interface
Courtesy of Harry Jackson <[EMAIL PROTECTED]>
Revision Changes Path
1.34 +21 -4 parrot/build_tools/build_nativecall.pl
Index: build_nativecall.pl
===================================================================
RCS file: /cvs/public/parrot/build_tools/build_nativecall.pl,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -w -r1.33 -r1.34
--- build_nativecall.pl 2 Jan 2004 14:09:28 -0000 1.33
+++ build_nativecall.pl 2 Jan 2004 21:22:17 -0000 1.34
@@ -134,7 +134,7 @@
/* nci.c
* Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
* CVS Info
- * $Id: build_nativecall.pl,v 1.33 2004/01/02 14:09:28 leo Exp $
+ * $Id: build_nativecall.pl,v 1.34 2004/01/02 21:22:17 dan Exp $
* Overview:
* Native Call Interface routines. The code needed to build a
* parrot to C call frame is in here
@@ -143,7 +143,6 @@
* Notes:
* References:
*/
-
#include "parrot/parrot.h"
#if defined(HAS_JIT) && defined(I386)
@@ -207,8 +206,13 @@
to a function that can call it. */
void *
build_call_func(struct Parrot_Interp *interpreter, PMC *pmc_nci,
- String *signature)
+ STRING *signature)
{
+
+ STRING *ns;
+ STRING *message;
+ char *c;
+
#if defined(CAN_BUILD_CALL_FRAMES)
/* This would be a good place to put the code that builds the
frames. Undoubtedly painfully platform-dependent */
@@ -221,7 +225,20 @@
UNUSED(pmc_nci);
if (0 == string_length(signature)) return F2DPTR(pcf_v_v);
$icky_global_bit
- PANIC("Unknown signature type");
+
+
+ /*
+ These three lines have been added to aid debugging. I want to be able to
+ see which signature has an unknown type. I am sure someone can come up
+ with a neater way to do this.
+ */
+ ns = string_make(interpreter, " is an unknown signature type", 30, NULL, 0,
NULL);
+ message = string_concat(interpreter, signature, ns, 0);
+
+ // I think there may be memory issues with this but if we get to here we are
+ // aborting.
+ c = string_to_cstring(interpreter, message);
+ PANIC(c);
return NULL;
#endif
}
1.7 +2 -2 parrot/src/utils.c
Index: utils.c
===================================================================
RCS file: /cvs/public/parrot/src/utils.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -r1.6 -r1.7
--- utils.c 2 Jan 2004 16:25:39 -0000 1.6
+++ utils.c 2 Jan 2004 21:22:19 -0000 1.7
@@ -1,7 +1,7 @@
/* utils.c
* Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
* CVS Info
- * $Id: utils.c,v 1.6 2004/01/02 16:25:39 leo Exp $
+ * $Id: utils.c,v 1.7 2004/01/02 21:22:19 dan Exp $
* Overview:
* Some utility functions
* Data Structure and Algorithms:
@@ -326,7 +326,7 @@
UINTVAL offset = 0;
/* Free each piece */
while (array[offset] != NULL) {
- string_cstring_free(array[offset]);
+ string_cstring_free(array[offset++]);
}
/* And then the holding array */
mem_sys_free(array);