nsfInt.h

Clone Tools
  • last updated 17 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Improve consistency of naming nsf objects

Change http:// occurrences to https://, if applicable (URLs tested)

  1. … 57 more files in changeset.
improve spelling

  1. … 3 more files in changeset.
* nsf.c (NsfOUplevelMethod, NsfOUpvarMethod, NsfCallstackFindCallingContext): Reform of uplevel and upvar methods, based on the recent feedback by Zoran. First, uplevel and upvar methods, as well as [current callinglevel] now behave consistently (re frame skipping for mixin and filter transparency). If there is no innermost enclosing proc frame, the innermost non-proc (e.g., namespace) frame is selected (rather than a "#0" as default). Second, argument handling for both uplevel (i.e., level sniffing in multi-arg case) and upvar (e.g., made silent TCL_ERROR for invalid argument arities explicit) have been fixed. * Object.man, methods.test: Added documentation for both methods (Object.man) and tests.

  1. … 7 more files in changeset.
Extend up-reform to uplevel, introduce NsfCallstackFindCallingContext, added tests

  1. … 3 more files in changeset.
added an additional variant of ALLOC_ON_STACK

The new version does not use alloca(), it does not use VLA

and it does not boat the stack in case huge vectors are to be processed.

It uses a plain array up to a certain size and switches to malloc()

above this size.

  1. … 1 more file in changeset.
- improved error message "not allowed to have default": make clear, this is from a parameter specification - added object property "autonamed" (set automatically for objects created via "new") - xotcl2 volatile: improved backward compatibility with XOTcl 1 - extended regression test

  1. … 4 more files in changeset.
* nsf.c, nsfShadow.c (NsfProcStubDeleteProc, Nsf_RenameObjCmd): Provide for coupled renaming of the nsf::proc pairs; and coupled deletion.

  1. … 3 more files in changeset.
* nsf.c, nsfShadow.c (NsfProcStubDeleteProc, Nsf_RenameObjCmd): Provide for coupled renaming of the nsf::proc pairs; and coupled deletion.

  1. … 3 more files in changeset.
* nsf.c, nsfInt.h (NsfProcStub, NsfProcClientData): Apply namespace reform to nsf::procs, to prevent proc redefinition after a proc rename to fail. * nsf-cmd.test: Add test case to document/ to cover failing rename + redefine.

  1. … 2 more files in changeset.
* nsf.c, nsfInt.h (NsfProcStub, NsfProcClientData): Apply namespace reform to nsf::procs, to prevent proc redefinition after a proc rename to fail. * nsf-cmd.test: Add test case to document/ to cover failing rename + redefine.

  1. … 2 more files in changeset.
improve handling of HAVE_INTTYPES_H under windows

  1. … 1 more file in changeset.
guard definition of PRIxPTR by HAVE_INTTYPES_H and not by HAVE_STDINT_H

improve type cleanness

  1. … 1 more file in changeset.
updates of annouce file, tested with mongo-c-dirver 1.12.0 (released yesterday)

  1. … 6 more files in changeset.
* nsfDebug.c, nsfInt.h (STRING_NEW, MEM_COUNT_ALLOC, MEM_COUNT_FREE): Fix compilation with --enable-memcount=yes.

  1. … 1 more file in changeset.
WIP

  1. … 1 more file in changeset.
* nsfInt.h (STRING_NEW): Silence GCC 8.1 warnings on truncation risk using strncpy; made me wonder whether STRING_NEW would not be more robust against mis-computations of the destination-buffer length by using snprintf (mainly because snprintf does not nul-pad the destination buffer and always nul-terminates the destination buffer)?

* nsf.c (ParamOptionParse), nsfInt.h: Provide for own MAX and MIN macros, the ones reused implicitly from Tcl's tommath have vanished in 8.7 branches; and are not provided otherwise, at least in MinGW settings. Fixes 8.7 builds for MinGW under Win.

  1. … 1 more file in changeset.
* nsf.c (ListMethod): Provide a disassemble implementation based on ::tcl::unsupported::disassemble. [::nsf::cmf::info disassemble] is generally available, the info ?object? method variants only in development mode. Implementation covers proc methods and ::nsf::procs. Along the way, prettify some code paths in ListMethod.

  1. … 7 more files in changeset.
add const declarations, reduce variable scopes, break longish lines

  1. … 2 more files in changeset.
add const and pure declarations

  1. … 2 more files in changeset.
More code cleanup

- make nsf compilable with tcl 8.7.2 and TCL_NO_DEPRECATED turned on

- prefer bool over int

- reduce nr of returns before end of function

- line bread overlong function definitions

  1. … 12 more files in changeset.
introduce macro ObjTypeStr for commonly used idiom

  1. … 1 more file in changeset.
add NsfDList functions similar to Tcl_DString, but operating on void* instead of char and use it for ColonCmdCache data

  1. … 1 more file in changeset.
Simplify handling of "returns" object. no need to require paramdefs, when just returnsObj is needed

  1. … 1 more file in changeset.
coloncmd reform (part 3): keep a per-interp list of colon command cache entries to avoid memory leaks in cases the objects are converted

  1. … 1 more file in changeset.
coloncmd reform (part 2): generalize code and apply for object specific commands as well

  1. … 3 more files in changeset.
More code cleanup:

- move nonnull assertion to separate line

- use Boolean type when appropriate

  1. … 1 more file in changeset.
Boolean type introduction

- Define Boolean type in a cross compiler / cross platform compatible way (similar to NaviServer)

- Include type in nsfInt (interal usage) but capable for pushing it to public usage later

- Use Boolean type for the most obvious cases

  1. … 1 more file in changeset.