Front page | perl.cvs.mod_parrot |
Postings from September 2009
[svn:mod_parrot] r665 - in mod_parrot/trunk: include lib src
From:
jhorwitz
Date:
September 7, 2009 08:49
Subject:
[svn:mod_parrot] r665 - in mod_parrot/trunk: include lib src
Message ID:
20090907154924.1F5351844F0@xx12.develooper.com
Author: jhorwitz
Date: Mon Sep 7 08:49:22 2009
New Revision: 665
Modified:
mod_parrot/trunk/include/mod_parrot.h
mod_parrot/trunk/lib/mod_parrot.pir
mod_parrot/trunk/src/nci.c
mod_parrot/trunk/src/parrot_util.c
Log:
remove modparrot_backtrace, which used parrot internal structures and breaks too often
Modified: mod_parrot/trunk/include/mod_parrot.h
==============================================================================
--- mod_parrot/trunk/include/mod_parrot.h (original)
+++ mod_parrot/trunk/include/mod_parrot.h Mon Sep 7 08:49:22 2009
@@ -106,7 +106,6 @@
int modparrot_call_sub_IP(Parrot_Interp, char *, char *, int *, Parrot_PMC);
int modparrot_call_sub_IPS(Parrot_Interp, char *, char *, int *, Parrot_PMC,
char *);
-char *modparrot_backtrace(Parrot_Interp);
Parrot_PMC get_sub_pmc(Parrot_Interp , char *, char *);
Parrot_PMC modparrot_get_meta_handler(Parrot_Interp , char *, char *);
int modparrot_call_meta_handler_sub(Parrot_Interp, Parrot_PMC, int *,
Modified: mod_parrot/trunk/lib/mod_parrot.pir
==============================================================================
--- mod_parrot/trunk/lib/mod_parrot.pir (original)
+++ mod_parrot/trunk/lib/mod_parrot.pir Mon Sep 7 08:49:22 2009
@@ -39,9 +39,6 @@
dlfunc func, lib, "mpnci_null", "p"
set_root_global [ 'ModParrot'; 'NCI' ], "null", func
- dlfunc func, lib, "mpnci_backtrace", "tJ"
- set_root_global [ 'ModParrot'; 'NCI' ], "backtrace", func
-
dlfunc func, lib, "mpnci_request_rec", "pJ"
set_root_global [ 'ModParrot'; 'NCI' ], "request_rec", func
Modified: mod_parrot/trunk/src/nci.c
==============================================================================
--- mod_parrot/trunk/src/nci.c (original)
+++ mod_parrot/trunk/src/nci.c Mon Sep 7 08:49:22 2009
@@ -251,11 +251,6 @@
return(bytes);
}
-char *mpnci_backtrace(Parrot_Interp interp)
-{
- return (char *)modparrot_backtrace(interp);
-}
-
void mpnci_ap_log_rerror(Parrot_Interp interp, char *file, int line, int level,
apr_status_t status, request_rec *r, char *msg)
{
Modified: mod_parrot/trunk/src/parrot_util.c
==============================================================================
--- mod_parrot/trunk/src/parrot_util.c (original)
+++ mod_parrot/trunk/src/parrot_util.c Mon Sep 7 08:49:22 2009
@@ -239,67 +239,6 @@
return(1);
}
-/* adapted from Parrot's PDB_backtrace */
-char *modparrot_backtrace(Parrot_Interp interp)
-{
- STRING *str, *buf = NULL;
- PMC *sub;
- PMC *old = PMCNULL;
- int rec_level = 0;
- Parrot_Context *ctx = CONTEXT(interp);
- char *trace_string;
-
- /* information about the current sub */
- sub = interpinfo_p(interp, CURRENT_SUB);
- if (!PMC_IS_NULL(sub)) {
- str = Parrot_Context_infostr(interp, ctx);
- if (str)
- buf = Parrot_str_concat(interp, buf, str, 0);
- }
-
- /* backtrace: follow the continuation chain */
- while (1) {
- sub = ctx->current_cont;
- if (!sub)
- break;
- str = Parrot_Context_infostr(interp,
- PMC_cont(sub)->to_ctx);
- if (!str)
- break;
-
- /* recursion detection */
- if (!PMC_IS_NULL(old) && PMC_cont(old) &&
- PMC_cont(old)->to_ctx->current_pc ==
- PMC_cont(sub)->to_ctx->current_pc &&
- PMC_cont(old)->to_ctx->current_sub ==
- PMC_cont(sub)->to_ctx->current_sub) {
- ++rec_level;
- } else if (rec_level != 0) {
- buf = Parrot_sprintf_c(interp, "... call repeated %d times\n",
- rec_level);
- buf = Parrot_str_concat(interp, buf, str, 0);
- rec_level = 0;
- }
-
- /* print the context description */
- if (rec_level == 0)
- buf = Parrot_str_concat(interp, buf, str, 0);
-
- /* get the next Continuation */
- ctx = PMC_cont(sub)->to_ctx;
- old = sub;
- if (!ctx)
- break;
- }
- if (rec_level != 0) {
- buf = Parrot_sprintf_c(interp,"... call repeated %d times\n",
- rec_level);
- }
-
- trace_string = Parrot_str_to_cstring(interp, buf);
- return(trace_string);
-}
-
Parrot_PMC modparrot_wrap_apache_type(Parrot_Interp interp, char *classname,
char *init_key, void *init_val)
{
-
[svn:mod_parrot] r665 - in mod_parrot/trunk: include lib src
by jhorwitz