Skip to content

Commit

Permalink
Revert changes in vendor module
Browse files Browse the repository at this point in the history
  • Loading branch information
kianmeng committed Oct 17, 2021
1 parent aaaf89b commit 0681b5d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions pycparser/ply/ctokens.py
Expand Up @@ -30,7 +30,7 @@
# Ternary operator (?)
'TERNARY',

# Delimiters ( ) [ ] { } , . ; :
# Delimeters ( ) [ ] { } , . ; :
'LPAREN', 'RPAREN',
'LBRACKET', 'RBRACKET',
'LBRACE', 'RBRACE',
Expand Down Expand Up @@ -86,7 +86,7 @@
# ?
t_TERNARY = r'\?'

# Delimiters
# Delimeters
t_LPAREN = r'\('
t_RPAREN = r'\)'
t_LBRACKET = r'\['
Expand Down
4 changes: 2 additions & 2 deletions pycparser/ply/yacc.py
Expand Up @@ -32,7 +32,7 @@
# -----------------------------------------------------------------------------
#
# This implements an LR parser that is constructed from grammar rules defined
# as Python functions. The grammar is specified by supplying the BNF inside
# as Python functions. The grammer is specified by supplying the BNF inside
# Python documentation strings. The inspiration for this technique was borrowed
# from John Aycock's Spark parsing system. PLY might be viewed as cross between
# Spark and the GNU bison utility.
Expand Down Expand Up @@ -1500,7 +1500,7 @@ def __init__(self, terminals):
self.Precedence = {} # Precedence rules for each terminal. Contains tuples of the
# form ('right',level) or ('nonassoc', level) or ('left',level)

self.UsedPrecedence = set() # Precedence rules that were actually used by the grammar.
self.UsedPrecedence = set() # Precedence rules that were actually used by the grammer.
# This is only used to provide error checking and to generate
# a warning about unused precedence rules.

Expand Down
24 changes: 12 additions & 12 deletions utils/benchmark/inputs/sqlite-btree.c.ppout
Expand Up @@ -3652,7 +3652,7 @@ struct Btree {
sqlite3 *db;
BtShared *pBt;
u8 inTrans;
u8 shareable;
u8 sharable;
u8 locked;
u8 hasIncrblobCur;
int wantToLock;
Expand Down Expand Up @@ -3785,7 +3785,7 @@ static int querySharedCacheTableLock(Btree *p, Pgno iTab, u8 eLock){
assert( eLock==1 || pBt->inTransaction==2 );


if( !p->shareable ){
if( !p->sharable ){
return 0;
}

Expand Down Expand Up @@ -3830,7 +3830,7 @@ static int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){



assert( p->shareable );
assert( p->sharable );
assert( 0==querySharedCacheTableLock(p, iTable, eLock) );


Expand Down Expand Up @@ -3872,7 +3872,7 @@ static void clearAllSharedCacheTableLocks(Btree *p){
BtLock **ppIter = &pBt->pLock;

assert( sqlite3BtreeHoldsMutex(p) );
assert( p->shareable || 0==*ppIter );
assert( p->sharable || 0==*ppIter );
assert( p->inTrans>0 );

while( *ppIter ){
Expand Down Expand Up @@ -5378,7 +5378,7 @@ int sqlite3BtreeOpen(
char *zFullPathname = sqlite3Malloc(((nFullPathname)>(nFilename)?(nFullPathname):(nFilename)));
sqlite3_mutex *mutexShared;

p->shareable = 1;
p->sharable = 1;
if( !zFullPathname ){
sqlite3_free(p);
return 7;
Expand Down Expand Up @@ -5498,7 +5498,7 @@ int sqlite3BtreeOpen(


pBt->nRef = 1;
if( p->shareable ){
if( p->sharable ){
sqlite3_mutex *mutexShared;
mutexShared = sqlite3MutexAlloc(2);
if( 1 && sqlite3Config.bCoreMutex ){
Expand All @@ -5521,11 +5521,11 @@ int sqlite3BtreeOpen(



if( p->shareable ){
if( p->sharable ){
int i;
Btree *pSib;
for(i=0; i<db->nDb; i++){
if( (pSib = db->aDb[i].pBt)!=0 && pSib->shareable ){
if( (pSib = db->aDb[i].pBt)!=0 && pSib->sharable ){
while( pSib->pPrev ){ pSib = pSib->pPrev; }
if( (uptr)p->pBt<(uptr)pSib->pBt ){
p->pNext = pSib;
Expand Down Expand Up @@ -5679,7 +5679,7 @@ int sqlite3BtreeClose(Btree *p){


assert( p->wantToLock==0 && p->locked==0 );
if( !p->shareable || removeFromSharingList(pBt) ){
if( !p->sharable || removeFromSharingList(pBt) ){



Expand Down Expand Up @@ -6193,7 +6193,7 @@ int sqlite3BtreeBeginTrans(Btree *p, int wrflag, int *pSchemaVersion){
if( p->inTrans==0 ){
pBt->nTransaction++;

if( p->shareable ){
if( p->sharable ){
assert( p->lock.pBtree==p && p->lock.iTable==1 );
p->lock.eLock = 1;
p->lock.pNext = pBt->pLock;
Expand Down Expand Up @@ -11268,7 +11268,7 @@ int sqlite3BtreeSchemaLocked(Btree *p){
int sqlite3BtreeLockTable(Btree *p, int iTab, u8 isWriteLock){
int rc = 0;
assert( p->inTrans!=0 );
if( p->shareable ){
if( p->sharable ){
u8 lockType = 1 + isWriteLock;
assert( 1 +1==2 );
assert( isWriteLock==0 || isWriteLock==1 );
Expand Down Expand Up @@ -11383,7 +11383,7 @@ int sqlite3HeaderSizeBtree(void){ return (((sizeof(MemPage))+7)&~7); }


int sqlite3BtreeSharable(Btree *p){
return p->shareable;
return p->sharable;
}


Expand Down

0 comments on commit 0681b5d

Please sign in to comment.