summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/gdevdflt.c8
-rw-r--r--base/lib.mak2
2 files changed, 9 insertions, 1 deletions
diff --git a/base/gdevdflt.c b/base/gdevdflt.c
index 57689377f..305f89db7 100644
--- a/base/gdevdflt.c
+++ b/base/gdevdflt.c
@@ -17,6 +17,8 @@
17#include "math_.h" 17#include "math_.h"
18#include "memory_.h" 18#include "memory_.h"
19#include "gx.h" 19#include "gx.h"
20#include "gsstruct.h"
21#include "gxobj.h"
20#include "gserrors.h" 22#include "gserrors.h"
21#include "gsropt.h" 23#include "gsropt.h"
22#include "gxcomp.h" 24#include "gxcomp.h"
@@ -26,6 +28,7 @@
26#include "gstrans.h" /* For gs_pdf14trans_t */ 28#include "gstrans.h" /* For gs_pdf14trans_t */
27#include "gxistate.h" /* for gs_image_state_s */ 29#include "gxistate.h" /* for gs_image_state_s */
28 30
31
29/* defined in gsdpram.c */ 32/* defined in gsdpram.c */
30int gx_default_get_param(gx_device *dev, char *Param, void *list); 33int gx_default_get_param(gx_device *dev, char *Param, void *list);
31 34
@@ -1294,6 +1297,11 @@ int gx_device_subclass(gx_device *dev_to_subclass, gx_device *new_prototype, uns
1294 ptr1 = ((char *)new_prototype) + sizeof(gx_device); 1297 ptr1 = ((char *)new_prototype) + sizeof(gx_device);
1295 memcpy(ptr, ptr1, new_prototype->params_size - sizeof(gx_device)); 1298 memcpy(ptr, ptr1, new_prototype->params_size - sizeof(gx_device));
1296 1299
1300 /* We have to patch up the "type" parameters that the memory manage/garbage
1301 * collector will use, as well.
1302 */
1303 (((obj_header_t *)dev_to_subclass) - 1)->o_type = new_prototype->stype;
1304
1297 /* If the original device's stype structure was dynamically allocated, we need 1305 /* If the original device's stype structure was dynamically allocated, we need
1298 * to 'fixup' the contents, it's procs need to point to the new device's procs 1306 * to 'fixup' the contents, it's procs need to point to the new device's procs
1299 * for instance. 1307 * for instance.
diff --git a/base/lib.mak b/base/lib.mak
index de783330a..09b70e57a 100644
--- a/base/lib.mak
+++ b/base/lib.mak
@@ -1210,7 +1210,7 @@ $(GLOBJ)gdevdsha.$(OBJ) : $(GLSRC)gdevdsha.c $(AK) $(gx_h)\
1210 1210
1211$(GLOBJ)gdevdflt.$(OBJ) : $(GLSRC)gdevdflt.c $(AK) $(gx_h)\ 1211$(GLOBJ)gdevdflt.$(OBJ) : $(GLSRC)gdevdflt.c $(AK) $(gx_h)\
1212 $(gserrors_h) $(gsropt_h) $(gxcomp_h) $(gxdevice_h) $(gxdevsop_h) $(math__h)\ 1212 $(gserrors_h) $(gsropt_h) $(gxcomp_h) $(gxdevice_h) $(gxdevsop_h) $(math__h)\
1213 $(MAKEDIRS) 1213 $(gsstruct_h) $(gxobj_h) $(MAKEDIRS)
1214 $(GLCC) $(GLO_)gdevdflt.$(OBJ) $(C_) $(GLSRC)gdevdflt.c 1214 $(GLCC) $(GLO_)gdevdflt.$(OBJ) $(C_) $(GLSRC)gdevdflt.c
1215 1215
1216$(GLOBJ)gdevdgbr.$(OBJ) : $(GLSRC)gdevdgbr.c $(AK) $(gx_h)\ 1216$(GLOBJ)gdevdgbr.$(OBJ) : $(GLSRC)gdevdgbr.c $(AK) $(gx_h)\