mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
Migrate to g_memdup2 (#288)
With fakeglib and older versions of GLib, fall back to g_memdup with a #define inside mdbprivate.h. Fixes #287
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "mdbtools.h"
|
||||
#include "mdbprivate.h"
|
||||
|
||||
/*
|
||||
* Temp table routines. These are currently used to generate mock results for
|
||||
@@ -73,7 +74,7 @@ mdb_temp_table_add_col(MdbTableDef *table, MdbColumn *col)
|
||||
col->col_num = table->num_cols;
|
||||
if (!col->is_fixed)
|
||||
col->var_col_num = table->num_var_cols++;
|
||||
g_ptr_array_add(table->columns, g_memdup(col, sizeof(MdbColumn)));
|
||||
g_ptr_array_add(table->columns, g_memdup2(col, sizeof(MdbColumn)));
|
||||
table->num_cols++;
|
||||
}
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user