Skip to content

Commit

Permalink
Change declaration that break C23 standards, rename configure.in as c…
Browse files Browse the repository at this point in the history
…onfigure.ac, removed unused directory from CFLAGS include arguments
  • Loading branch information
mxmanghi committed Feb 18, 2025
1 parent db31849 commit d49be82
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ YAJL_LIBS = @YAJL_LIBS@
# yajl incorrectly specified $(prefix)/include/yajl in pkg-config. This
# has been reported upstream as https://github.com/lloyd/yajl/pull/139.
# Until it's fixed, we work around it and get to the parent directory.
INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ $(YAJL_CFLAGS) $(YAJL_CFLAGS)/..
INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ $(YAJL_CFLAGS)

#INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@

Expand Down
3 changes: 2 additions & 1 deletion configure.in → configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ AC_INIT([yajltcl], [1.8.1])

TEA_INIT([3.9])

AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(tclconfig)

#--------------------------------------------------------------------
Expand Down Expand Up @@ -74,7 +75,7 @@ TEA_ADD_SOURCES([yajltcl.c tclyajltcl.c yajltcllex.c])
TEA_ADD_HEADERS([])
TEA_ADD_INCLUDES([])
TEA_ADD_LIBS([])
TEA_ADD_CFLAGS([])
TEA_ADD_CFLAGS([-I .])
TEA_ADD_STUB_SOURCES([])
TEA_ADD_TCL_SOURCES([yajl.tcl])

Expand Down
1 change: 1 addition & 0 deletions generic/tclyajltcl.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

#include <tcl.h>
#include "config.h"
#include "yajltcl.h"

#undef TCL_STORAGE_CLASS
Expand Down
13 changes: 5 additions & 8 deletions generic/yajltcl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <tcl.h>
#include "yajltcl.h"
#include "yajltcllex.h"
#include "config.h"
#include <string.h>


Expand Down Expand Up @@ -916,18 +917,18 @@ yajltcl_yajlObjectObjCmd(ClientData cData, Tcl_Interp *interp, int objc, Tcl_Obj

// bool? generate a boolean string and value
case OPT_BOOL: {
int bool;
int boolean;

if (arg + 1 >= objc) {
Tcl_WrongNumArgs (interp, 1, objv, "bool value");
return TCL_ERROR;
}

if (Tcl_GetBooleanFromObj (interp, objv[++arg], &bool) == TCL_ERROR) {
if (Tcl_GetBooleanFromObj (interp, objv[++arg], &boolean) == TCL_ERROR) {
return TCL_ERROR;
}

gstatus = yajl_gen_bool (hand, bool);
gstatus = yajl_gen_bool (hand, boolean);
break;
}

Expand Down Expand Up @@ -1154,11 +1155,7 @@ yajltcl_yajlObjectObjCmd(ClientData cData, Tcl_Interp *interp, int objc, Tcl_Obj

/* ARGSUSED */
int
yajltcl_yajlObjCmd(clientData, interp, objc, objv)
ClientData clientData; /* registered proc hashtable ptr. */
Tcl_Interp *interp; /* Current interpreter. */
int objc; /* Number of arguments. */
Tcl_Obj *CONST objv[];
yajltcl_yajlObjCmd(ClientData clientData,Tcl_Interp* interp,int objc,Tcl_Obj *CONST *objv)
{
yajltcl_clientData *yajlData;
int optIndex;
Expand Down

0 comments on commit d49be82

Please sign in to comment.