Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 6bcf2e5

Browse files
committed
Reverted changes in fields of MCCustomPrinterDocument so as to compile on Linux
1 parent 78da976 commit 6bcf2e5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

engine/include/customprinter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ struct MCCustomPrinterDocument
3939
const char *filename;
4040

4141
uint32_t option_count;
42-
MCStringRef const *option_keys;
43-
MCStringRef const *option_values;
42+
char * const *option_keys;
43+
char * const *option_values;
4444
};
4545

4646
struct MCCustomPrinterPage

engine/src/customprinter.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,22 +1127,22 @@ const char *MCCustomPrinterDevice::Error(void) const
11271127
struct convert_options_array_t
11281128
{
11291129
uindex_t index;
1130-
MCStringRef *option_keys;
1131-
MCStringRef *option_values;
1130+
char **option_keys;
1131+
char **option_values;
11321132
};
11331133

11341134
static bool convert_options_array(void *p_context, MCArrayRef p_array, MCNameRef p_key, MCValueRef p_value)
11351135
{
11361136
convert_options_array_t *ctxt;
11371137
ctxt = (convert_options_array_t *)p_context;
11381138

1139-
if (!MCStringCopy(MCNameGetString(p_key), ctxt -> option_keys[ctxt -> index]))
1139+
if (!MCStringConvertToCString(MCNameGetString(p_key), ctxt -> option_keys[ctxt -> index]))
11401140
return false;
11411141

11421142
if (MCValueGetTypeCode(p_value) != kMCValueTypeCodeString)
11431143
return false;
11441144

1145-
if (!MCStringCopy((MCStringRef)p_value, ctxt -> option_values[ctxt -> index]))
1145+
if (!MCStringConvertToCString((MCStringRef)p_value, ctxt -> option_values[ctxt -> index]))
11461146
return false;
11471147

11481148
ctxt -> index += 1;
@@ -1164,7 +1164,7 @@ MCPrinterResult MCCustomPrinterDevice::Start(const char *p_title, MCArrayRef p_o
11641164
t_document . filename = MCprinter -> GetDeviceOutputLocation();
11651165

11661166
// Extract the option strings
1167-
MCStringRef *t_option_keys, *t_option_values;
1167+
char **t_option_keys, **t_option_values;
11681168
uint32_t t_option_count;
11691169
t_option_keys = t_option_values = nil;
11701170
t_option_count = 0;

0 commit comments

Comments
 (0)