mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-05 22:38:44 +00:00
Merge pull request #24 from JetBrains-Research/stringBuf_init
Runtime: Initializate concatenation buffer by zeros
This commit is contained in:
commit
1a1c2e6280
6 changed files with 15 additions and 3 deletions
1
regression/.gitignore
vendored
1
regression/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
../stdlib/.gitignore
|
||||
5
regression/.gitignore
vendored
Normal file
5
regression/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
*.html
|
||||
*.sm
|
||||
/*.log
|
||||
*.i
|
||||
*.s
|
||||
|
|
@ -402,6 +402,7 @@ static StringBuf stringBuf;
|
|||
|
||||
static void createStringBuf () {
|
||||
stringBuf.contents = (char*) malloc (STRINGBUF_INIT);
|
||||
memset(stringBuf.contents, 0, STRINGBUF_INIT);
|
||||
stringBuf.ptr = 0;
|
||||
stringBuf.len = STRINGBUF_INIT;
|
||||
}
|
||||
|
|
|
|||
3
stdlib/.gitignore
vendored
3
stdlib/.gitignore
vendored
|
|
@ -1,6 +1,5 @@
|
|||
*.html
|
||||
*.sm
|
||||
*.log
|
||||
/*.log
|
||||
*.i
|
||||
*.s
|
||||
|
||||
|
|
|
|||
1
stdlib/regression/.gitignore
vendored
Normal file
1
stdlib/regression/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/*.log
|
||||
2
stdlib/regression/orig/test33.log
Normal file
2
stdlib/regression/orig/test33.log
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{}.string: 0
|
||||
{}.stringcat:
|
||||
5
stdlib/regression/test33.lama
Normal file
5
stdlib/regression/test33.lama
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import List;
|
||||
import Array;
|
||||
|
||||
printf ("{}.string: %s\n", {}.string);
|
||||
printf ("{}.stringcat: %s\n", {}.stringcat)
|
||||
Loading…
Add table
Add a link
Reference in a new issue