aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/c_src/wxe_return.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wx/c_src/wxe_return.cpp')
-rw-r--r--lib/wx/c_src/wxe_return.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/wx/c_src/wxe_return.cpp b/lib/wx/c_src/wxe_return.cpp
index aebf6bae1b..accd818a14 100644
--- a/lib/wx/c_src/wxe_return.cpp
+++ b/lib/wx/c_src/wxe_return.cpp
@@ -84,7 +84,13 @@ INLINE
unsigned int wxeReturn::size() {
return rt.GetCount();
}
-
+
+
+INLINE
+void wxeReturn::ensureFloatCount(size_t n) {
+ temp_float.Alloc(n);
+}
+
INLINE
void wxeReturn::add(ErlDrvTermData type, ErlDrvTermData data) {
rt.Add(type);
@@ -222,6 +228,7 @@ INLINE
void wxeReturn::add(wxArrayDouble val) {
unsigned int len = val.GetCount();
+ temp_float.Alloc(len);
for (unsigned int i = 0; i< len; i++) {
addFloat(val[i]);
}