]> git.pld-linux.org Git - packages/v8.git/blob - v8-strndup.patch
- updated URLs, dropped upstream-tracker.org note (this domain is dead now)
[packages/v8.git] / v8-strndup.patch
1 diff -ur v8-/src/allocation.h v8/src/allocation.h
2 --- v8-/src/allocation.h        2010-03-09 20:28:45.000000000 -0700
3 +++ v8/src/allocation.h 2010-03-09 21:07:04.000000000 -0700
4 @@ -124,7 +124,7 @@
5  // and StrNDup uses new and calls the FatalProcessOutOfMemory handler
6  // if allocation fails.
7  char* StrDup(const char* str);
8 -char* StrNDup(const char* str, int n);
9 +char* StrNDup(const char* str, size_t n);
10  
11  
12  // Allocation policy for allocating in the C free store using malloc
13 --- v8-3.4.3/src/allocation.cc.orig     2011-06-14 16:53:10.000000000 +0200
14 +++ v8-3.4.3/src/allocation.cc  2011-06-14 19:36:16.581069856 +0200
15 @@ -90,8 +90,8 @@
16  }
17  
18  
19 -char* StrNDup(const char* str, int n) {
20 -  int length = StrLength(str);
21 +char* StrNDup(const char* str, size_t n) {
22 +  size_t length = StrLength(str);
23    if (n < length) length = n;
24    char* result = NewArray<char>(length + 1);
25    memcpy(result, str, length);
This page took 0.029489 seconds and 3 git commands to generate.