Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
beac7222
Commit
beac7222
authored
27 years ago
by
Fredrik Hübinette (Hubbe)
Browse files
Options
Downloads
Patches
Plain Diff
more debug added
Rev: src/stralloc.c:1.31
parent
aa366d05
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/stralloc.c
+6
-3
6 additions, 3 deletions
src/stralloc.c
with
6 additions
and
3 deletions
src/stralloc.c
+
6
−
3
View file @
beac7222
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
#include
<ctype.h>
#include
<ctype.h>
RCSID
(
"$Id: stralloc.c,v 1.3
0
1998/0
3/28 15:11:13 gr
ubb
a
Exp $"
);
RCSID
(
"$Id: stralloc.c,v 1.3
1
1998/0
4/17 05:13:32 h
ubb
e
Exp $"
);
#define BEGIN_HASH_SIZE 997
#define BEGIN_HASH_SIZE 997
#define MAX_AVG_LINK_LENGTH 3
#define MAX_AVG_LINK_LENGTH 3
...
@@ -372,7 +372,7 @@ void check_string(struct pike_string *s)
...
@@ -372,7 +372,7 @@ void check_string(struct pike_string *s)
void
verify_shared_strings_tables
(
void
)
void
verify_shared_strings_tables
(
void
)
{
{
unsigned
INT32
e
,
h
;
unsigned
INT32
e
,
h
,
num
=
0
;
struct
pike_string
*
s
;
struct
pike_string
*
s
;
for
(
e
=
0
;
e
<
htable_size
;
e
++
)
for
(
e
=
0
;
e
<
htable_size
;
e
++
)
...
@@ -380,6 +380,7 @@ void verify_shared_strings_tables(void)
...
@@ -380,6 +380,7 @@ void verify_shared_strings_tables(void)
h
=
0
;
h
=
0
;
for
(
s
=
base_table
[
e
];
s
;
s
=
s
->
next
)
for
(
s
=
base_table
[
e
];
s
;
s
=
s
->
next
)
{
{
num
++
;
h
++
;
h
++
;
if
(
s
->
len
<
0
)
if
(
s
->
len
<
0
)
fatal
(
"Shared string shorter than zero bytes.
\n
"
);
fatal
(
"Shared string shorter than zero bytes.
\n
"
);
...
@@ -415,6 +416,8 @@ void verify_shared_strings_tables(void)
...
@@ -415,6 +416,8 @@ void verify_shared_strings_tables(void)
}
}
}
}
}
}
if
(
num
!=
num_strings
)
fatal
(
"Num strings is wrong %d!=%d
\n
"
,
num
,
num_strings
);
}
}
int
safe_debug_findstring
(
struct
pike_string
*
foo
)
int
safe_debug_findstring
(
struct
pike_string
*
foo
)
...
@@ -835,7 +838,7 @@ void count_memory_in_strings(INT32 *num, INT32 *size)
...
@@ -835,7 +838,7 @@ void count_memory_in_strings(INT32 *num, INT32 *size)
}
}
#ifdef DEBUG
#ifdef DEBUG
if
(
num_strings
!=
num_
)
if
(
num_strings
!=
num_
)
fatal
(
"Num strings is wrong!
.
\n
"
);
fatal
(
"Num strings is wrong!
%d!=%d.
\n
"
,
num_strings
,
num_
);
#endif
#endif
num
[
0
]
=
num_
;
num
[
0
]
=
num_
;
size
[
0
]
=
size_
;
size
[
0
]
=
size_
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment