summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--poppler/Gfx.cc5
-rw-r--r--poppler/Gfx.h2
-rw-r--r--poppler/Object.h2
-rw-r--r--poppler/XRef.cc2
4 files changed, 5 insertions, 6 deletions
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index ea85dcd1..f64606ad 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -832,12 +832,11 @@ void Gfx::go(GBool topLevel) {
void Gfx::execOp(Object *cmd, Object args[], int numArgs) {
Operator *op;
- char *name;
Object *argPtr;
int i;
// find operator
- name = cmd->getCmd();
+ const char *name = cmd->getCmd();
if (!(op = findOp(name))) {
if (ignoreUndef == 0)
error(errSyntaxError, getPos(), "Unknown operator '{0:s}'", name);
@@ -879,7 +878,7 @@ void Gfx::execOp(Object *cmd, Object args[], int numArgs) {
(this->*op->func)(argPtr, numArgs);
}
-Operator *Gfx::findOp(char *name) {
+Operator *Gfx::findOp(const char *name) {
int a, b, m, cmp;
a = -1;
diff --git a/poppler/Gfx.h b/poppler/Gfx.h
index 3ac4c929..ae83e8f4 100644
--- a/poppler/Gfx.h
+++ b/poppler/Gfx.h
@@ -247,7 +247,7 @@ private:
void go(GBool topLevel);
void execOp(Object *cmd, Object args[], int numArgs);
- Operator *findOp(char *name);
+ Operator *findOp(const char *name);
GBool checkArg(Object *arg, TchkType type);
Goffset getPos();
diff --git a/poppler/Object.h b/poppler/Object.h
index 3dcf9e6b..7af91c33 100644
--- a/poppler/Object.h
+++ b/poppler/Object.h
@@ -259,7 +259,7 @@ public:
Ref getRef() const { OBJECT_TYPE_CHECK(objRef); return ref; }
int getRefNum() const { OBJECT_TYPE_CHECK(objRef); return ref.num; }
int getRefGen() const { OBJECT_TYPE_CHECK(objRef); return ref.gen; }
- char *getCmd() const { OBJECT_TYPE_CHECK(objCmd); return cString; }
+ const char *getCmd() const { OBJECT_TYPE_CHECK(objCmd); return cString; }
long long getInt64() const { OBJECT_TYPE_CHECK(objInt64); return int64g; }
long long getIntOrInt64() const { OBJECT_2TYPES_CHECK(objInt, objInt64);
return type == objInt ? intg : int64g; }
diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index 1dac5216..7b492491 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -1152,7 +1152,7 @@ Object XRef::fetch(int num, int gen, int recursion) {
if (obj1.isInt() && obj1.getInt() == num &&
obj2.isInt() && obj2.getInt() == gen &&
obj3.isCmd()) {
- char *cmd = obj3.getCmd();
+ const char *cmd = obj3.getCmd();
if (strlen(cmd) > 3 &&
cmd[0] == 'o' &&
cmd[1] == 'b' &&