Summary: | build fails - variable size array in perl/qtcore/src/util.cpp | ||
---|---|---|---|
Product: | [Developer tools] bindings | Reporter: | tropikhajma <tropikhajma> |
Component: | general | Assignee: | kde-bindings |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | chrisburel |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Solaris | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
Create variable size array on the heap
Create variable size array on the heap |
Description
tropikhajma
2010-07-09 12:53:49 UTC
Created attachment 49371 [details]
Create variable size array on the heap
I looked through the rest of the source, and this is the only location I see that doesn't use new[] to make a variable sized array.
Comment on attachment 49371 [details]
Create variable size array on the heap
--- kdebindings-4.4.92/perl/qtcore/src/util.cpp 2010-06-24 09:31:32.000000000 -0700
+++ kdebindings/perl/qtcore/src/util.cpp 2010-07-21 14:03:12.383019515 -0700
@@ -426,10 +426,9 @@
}
// Get the ISA array, nisa is a temp string to build package::ISA
- char nisa[strlen(package)+6];
+ char *nisa = new char[strlen(package)+6];
sprintf( nisa, "%s::ISA", package );
AV* isa = get_av( nisa, true );
+ delete[] nisa;
// Loop over the ISA array
for( int i = 0; i <= av_len( isa ); i++ ) {
Comment on attachment 49371 [details]
Create variable size array on the heap
This patch is reversed.
Created attachment 49373 [details]
Create variable size array on the heap
confirming the patch helped This patch was applied in revision 1155137. |