comparison Python/import.c @ 3964:fcfec6a810ba legacy-trunk

Added casts from unsigned char to char when calling rds_object() on frozen code.
author Guido van Rossum <guido@python.org>
date Thu, 08 Aug 1996 18:52:59 +0000
parents 22e29b1747e1
children 90216e907345
comparison
equal deleted inserted replaced
3963:00722990b80c 3964:fcfec6a810ba
594 594
595 if (p == NULL) { 595 if (p == NULL) {
596 err_setstr(ImportError, "No such frozen object"); 596 err_setstr(ImportError, "No such frozen object");
597 return NULL; 597 return NULL;
598 } 598 }
599 return rds_object(p->code, p->size); 599 return rds_object((char *)p->code, p->size);
600 } 600 }
601 601
602 /* Initialize a frozen module. 602 /* Initialize a frozen module.
603 Return 1 for succes, 0 if the module is not found, and -1 with 603 Return 1 for succes, 0 if the module is not found, and -1 with
604 an exception set if the initialization failed. 604 an exception set if the initialization failed.
614 614
615 if (p == NULL) 615 if (p == NULL)
616 return 0; 616 return 0;
617 if (verbose) 617 if (verbose)
618 fprintf(stderr, "import %s # frozen\n", name); 618 fprintf(stderr, "import %s # frozen\n", name);
619 co = rds_object(p->code, p->size); 619 co = rds_object((char *)p->code, p->size);
620 if (co == NULL) 620 if (co == NULL)
621 return -1; 621 return -1;
622 if (!is_codeobject(co)) { 622 if (!is_codeobject(co)) {
623 DECREF(co); 623 DECREF(co);
624 err_setstr(TypeError, "frozen object is not a code object"); 624 err_setstr(TypeError, "frozen object is not a code object");