diff options
author | antirez <antirez> | 2005-03-29 13:38:04 +0000 |
---|---|---|
committer | antirez <antirez> | 2005-03-29 13:38:04 +0000 |
commit | a509d195c3a6c6114934d0085a0861fcf77b9d3f (patch) | |
tree | f26291974c8ba74ffcc29a5f30fb12d8667ccb5f /jim.h | |
parent | d6f57adaa070c9e06d6d2e2e90edf166afea7933 (diff) | |
download | jimtcl-a509d195c3a6c6114934d0085a0861fcf77b9d3f.zip jimtcl-a509d195c3a6c6114934d0085a0861fcf77b9d3f.tar.gz jimtcl-a509d195c3a6c6114934d0085a0861fcf77b9d3f.tar.bz2 |
A number of fix for commands optimizing a bit too much objects
not shared, that didn't played very well with Jim arrays.
Added the [rand] command.
Diffstat (limited to 'jim.h')
-rw-r--r-- | jim.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -2,7 +2,7 @@ * Copyright 2005 Salvatore Sanfilippo <antirez@invece.org> * Copyright 2005 Clemens Hintze <c.hintze@gmx.net> * - * $Id: jim.h,v 1.63 2005/03/21 17:04:38 chi Exp $ + * $Id: jim.h,v 1.64 2005/03/29 13:38:04 antirez Exp $ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -406,6 +406,12 @@ typedef struct Jim_Cmd { int arityMax; /* Max number of arguments. */ } Jim_Cmd; +/* Pseudo Random Number Generator State structure */ +typedef struct Jim_PrngState { + unsigned char sbox[256]; + unsigned int i, j; +} Jim_PrngState; + /* ----------------------------------------------------------------------------- * Jim interpreter structure. * Fields similar to the real Tcl interpreter structure have the same names. @@ -452,6 +458,7 @@ typedef struct Jim_Interp { int (*getApiFuncPtr)(struct Jim_Interp *, const char *, void *); struct Jim_CallFrame *freeFramesList; /* list of CallFrame structures. */ struct Jim_HashTable assocData; /* per-interp storage for use by packages */ + Jim_PrngState *prngState; /* per interpreter Random Number Gen. state. */ } Jim_Interp; /* Currently provided as macro that performs the increment. |