static int gs_writer(void *caller_handle, const char *str, int len)
{
- GVJ_t *job = (GVJ_t*)caller_handle;
+ GVJ_t *job = caller_handle;
if (job->common->verbose)
return fwrite(str, 1, len, stderr);
if (us->data) {
if (us->datafree == gvloadimage_gs_free
- && ((gs_t*)(us->data))->cr == (cairo_t *)job->context)
+ && ((gs_t*)(us->data))->cr == job->context)
gs = us->data; /* use cached data */
else {
us->datafree(us); /* free incompatible cache data */
job->common->errorfn("malloc() failure\n");
return NULL;
}
- gs->cr = (cairo_t *)job->context;
+ gs->cr = job->context;
gs->surface = NULL;
gs->pattern = NULL;
return NULL;
}
- rc = gsapi_new_instance(&instance, (void*)job);
+ rc = gsapi_new_instance(&instance, job);
if (rc)
gs_error(job, us->name, "gsapi_new_instance", rc);
else {
static void gvloadimage_gs_cairo(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
- cairo_t *cr = (cairo_t *) job->context; /* target context */
+ cairo_t *cr = job->context; // target context
cairo_pattern_t *pattern = gvloadimage_gs_load(job, us);
if (pattern) {