You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_tcl-dev@tcl.apache.org by ml...@apache.org on 2002/04/09 19:47:35 UTC
cvs commit: tcl-modtcl tcl_cmds.c
mlink 02/04/09 10:47:35
Modified: . tcl_cmds.c
Log:
2.0.35 support, Tcl 8.4a4 support which includes support for 64-bit types, like the allow stuff in the request_rec
Revision Changes Path
1.8 +16 -13 tcl-modtcl/tcl_cmds.c
Index: tcl_cmds.c
===================================================================
RCS file: /home/cvs/tcl-modtcl/tcl_cmds.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- tcl_cmds.c 6 Dec 2001 19:37:56 -0000 1.7
+++ tcl_cmds.c 9 Apr 2002 17:47:35 -0000 1.8
@@ -640,7 +640,7 @@
{
Tcl_Obj *obj = Tcl_NewObj();
int i;
- apr_array_header_t *ha = apr_table_elts(_r->headers_in);
+ const apr_array_header_t *ha = apr_table_elts(_r->headers_in);
apr_table_entry_t *hte = (apr_table_entry_t*) ha->elts;
for (i = 0; i < ha->nelts; i++) {
@@ -655,7 +655,7 @@
{
Tcl_Obj *obj = Tcl_NewObj();
int i;
- apr_array_header_t *ha = apr_table_elts(_r->headers_out);
+ const apr_array_header_t *ha = apr_table_elts(_r->headers_out);
apr_table_entry_t *hte = (apr_table_entry_t*) ha->elts;
for (i = 0; i < ha->nelts; i++) {
@@ -670,7 +670,7 @@
{
Tcl_Obj *obj = Tcl_NewObj();
int i;
- apr_array_header_t *ha = apr_table_elts(_r->err_headers_out);
+ const apr_array_header_t *ha = apr_table_elts(_r->err_headers_out);
apr_table_entry_t *hte = (apr_table_entry_t*) ha->elts;
for (i = 0; i < ha->nelts; i++) {
@@ -686,7 +686,7 @@
{
Tcl_Obj *obj = Tcl_NewObj();
int i;
- apr_array_header_t *ha = apr_table_elts(_r->subprocess_env);
+ const apr_array_header_t *ha = apr_table_elts(_r->subprocess_env);
apr_table_entry_t *hte = (apr_table_entry_t*) ha->elts;
for (i = 0; i < ha->nelts; i++) {
@@ -701,7 +701,7 @@
{
Tcl_Obj *obj = Tcl_NewObj();
int i;
- apr_array_header_t *ha = apr_table_elts(_r->notes);
+ const apr_array_header_t *ha = apr_table_elts(_r->notes);
apr_table_entry_t *hte = (apr_table_entry_t*) ha->elts;
for (i = 0; i < ha->nelts; i++) {
@@ -865,7 +865,7 @@
{
Tcl_Obj *obj = Tcl_NewObj();
int i;
- apr_array_header_t *ha = apr_table_elts(_r->connection->notes);
+ const apr_array_header_t *ha = apr_table_elts(_r->connection->notes);
apr_table_entry_t *hte = (apr_table_entry_t*) ha->elts;
for (i = 0; i < ha->nelts; i++) {
@@ -1037,9 +1037,10 @@
static int r_set_allowed(int objc, Tcl_Obj *CONST objv[])
{
-/* needs to be apr_int64_t, TCL doesn't support this in 8.3.4...
- Tcl_GetIntFromObj(interp, objv[2], &(_r->allowed));
-*/
+#if TCL_MAJOR_VERSION > 7 && TCL_MINOR_VERSION > 3
+ Tcl_GetWideIntFromObj(interp, objv[2], &(_r->allowed));
+#endif
+
return TCL_OK;
}
@@ -1059,8 +1060,8 @@
Tcl_WrongNumArgs(interp, 2, objv, "method_mask method_list");
return TCL_ERROR;
}
-/* needs to be apr_int64_t, TCL doesn't support this in 8.3.4...
- Tcl_GetIntFromObj(interp, objv[2], &(_r->allowed_methods->method_mask));
+#if TCL_MAJOR_VERSION > 7 && TCL_MINOR_VERSION > 3
+ Tcl_GetWideIntFromObj(interp, objv[2], &(_r->allowed_methods->method_mask));
if (Tcl_ListObjGetElements(interp, objv[3], &xxobjc, &xxobjv) == TCL_ERROR) {
return TCL_ERROR;
@@ -1073,7 +1074,7 @@
xx = apr_pstrdup(_r->allowed_methods->method_list->pool, Tcl_GetString(xxobjv[i]));
}
-*/
+#endif
return TCL_OK;
}
@@ -2015,6 +2016,8 @@
Tcl_SetVar2Ex(interp, "R", NULL, Tcl_NewByteArrayObj(buffer, bufsiz), TCL_LEAVE_ERR_MSG);
}
+ free(buffer);
+
return TCL_OK;
}
@@ -2104,7 +2107,7 @@
Tcl_GetIntFromObj(interp, objv[1], &methnum);
- Tcl_SetObjResult(interp, Tcl_NewStringObj(ap_method_name_of(methnum), -1));
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(ap_method_name_of(_r->pool, methnum), -1));
return TCL_OK;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: mod_tcl-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: mod_tcl-dev-help@tcl.apache.org