Tcl Library Source Code

Check-in [09ed31fbfc]
Login
Bounty program for improvements to Tcl and certain Tcl packages.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Move many-* wrapper to before its usage. Bumped version to 1.3.2. v1.3.1 is broken.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 09ed31fbfcd340e4a6e97a8ca8be8872d58d01d7
User & Date: andreask 2014-01-07 23:00:24
References
2014-01-08
00:18 Closed ticket [6efa4f571a]: C-implementation for json2dict plus 6 other changes artifact: 30e1f9d4a4 user: aku
Context
2014-01-08
18:21
Commit [c7f07ac148] forgot to update the package index, causing a mismatch. Fixed, likewise the Tcl requirement. check-in: 32ee5178ac user: andreask tags: trunk
2014-01-07
23:00
Move many-* wrapper to before its usage. Bumped version to 1.3.2. v1.3.1 is broken. check-in: 09ed31fbfc user: andreask tags: trunk
21:41
See ticket [6efa4f571af052]. Worked around issues with the critcl v2 application the Tcllib C code is geared towards. Bumped json version to 1.3.1, jsonc to 1.1.1, and tcllibc to 0.3.13. check-in: 2d0b61da55 user: andreask tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/json/ChangeLog.

1



2
3
4
5
6
7
8
2014-01-07  Andreas Kupries  <[email protected]>




	* c/json.tab.c: Worked around issues with the critcl v2
	* c/json.y: application the Tcllib C code is geared towards.
	* json.tcl: Bumped json version to 1.3.1, jsonc to 1.1.1,
	* jsonc.tcl: and tcllibc to 0.3.13.
	* tcllibc.tcl: See ticket [6efa4f571af052].

>
>
>







1
2
3
4
5
6
7
8
9
10
11
2014-01-07  Andreas Kupries  <[email protected]>

	* json.tcl: Move many-* wrapper to before its usage. Bumped
	  version to 1.3.2. v1.3.1 is broken.

	* c/json.tab.c: Worked around issues with the critcl v2
	* c/json.y: application the Tcllib C code is geared towards.
	* json.tcl: Bumped json version to 1.3.1, jsonc to 1.1.1,
	* jsonc.tcl: and tcllibc to 0.3.13.
	* tcllibc.tcl: See ticket [6efa4f571af052].

Changes to modules/json/json.tcl.

153
154
155
156
157
158
159







160
161
162
163
164
165
166
...
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
...
269
270
271
272
273
274
275
276
    variable  loaded  {}

    variable apicmds {
	json2dict
	many-json2dict
    }
}








# ### ### ### ######### ######### #########
## Initialization: Choose an implementation,
## most prefered first. Loads only one of the
## possible implementations. And activates it.

namespace eval ::json {
................................................................................
	    SwitchTo $e
	    break
	}
    }
    unset e
}

# ### ### ### ######### ######### #########
## Wrapper fix for the jsonc package to match APIs.

proc ::json::many-json2dict_critcl {args} {
    eval [linsert $args 0 ::json::many_json2dict_critcl]
}

# ### ### ### ######### ######### #########
## Tcl implementation of validation, shared for Tcl and C implementation.
##
## The regexp based validation is consistently faster than json-c.
## Suspected reasons: Tcl REs are mainly in C as well, and json-c has
## overhead in constructing its own data structures. While irrelevant
## to validation json-c still builds them, it has no mode doing pure
................................................................................
proc ::json::string2json {str} {
    return "\"$str\""
}

# ### ### ### ######### ######### #########
## Ready

package provide json 1.3.1






>
>
>
>
>
>
>







 







<
<
<
<
<
<
<







 







|
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
...
177
178
179
180
181
182
183







184
185
186
187
188
189
190
...
269
270
271
272
273
274
275
276
    variable  loaded  {}

    variable apicmds {
	json2dict
	many-json2dict
    }
}

# ### ### ### ######### ######### #########
## Wrapper fix for the jsonc package to match APIs.

proc ::json::many-json2dict_critcl {args} {
    eval [linsert $args 0 ::json::many_json2dict_critcl]
}

# ### ### ### ######### ######### #########
## Initialization: Choose an implementation,
## most prefered first. Loads only one of the
## possible implementations. And activates it.

namespace eval ::json {
................................................................................
	    SwitchTo $e
	    break
	}
    }
    unset e
}








# ### ### ### ######### ######### #########
## Tcl implementation of validation, shared for Tcl and C implementation.
##
## The regexp based validation is consistently faster than json-c.
## Suspected reasons: Tcl REs are mainly in C as well, and json-c has
## overhead in constructing its own data structures. While irrelevant
## to validation json-c still builds them, it has no mode doing pure
................................................................................
proc ::json::string2json {str} {
    return "\"$str\""
}

# ### ### ### ######### ######### #########
## Ready

package provide json 1.3.2

Changes to modules/json/pkgIndex.tcl.

1
2
3
4
5
6
7
# Tcl package index file, version 1.1

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded json 1.3.1 [list source [file join $dir json.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded json::write 1.0.2 [list source [file join $dir json_write.tcl]]


|



1
2
3
4
5
6
7
# Tcl package index file, version 1.1

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded json 1.3.2 [list source [file join $dir json.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded json::write 1.0.2 [list source [file join $dir json_write.tcl]]