aboutsummaryrefslogtreecommitdiff
path: root/src/parseh.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2015-12-14 18:10:25 -0700
committerAndrew Kelley <superjoe30@gmail.com>2015-12-14 18:10:25 -0700
commitf17e20d5fefeb9ce30a08e85c10b9449cf672112 (patch)
tree2907eae05aca64bbab1e7ca0c9c526c1f204848d /src/parseh.cpp
parent7dd29291853a30973c19867385514b6d807cb644 (diff)
downloadzig-f17e20d5fefeb9ce30a08e85c10b9449cf672112.tar.gz
zig-f17e20d5fefeb9ce30a08e85c10b9449cf672112.zip
instead of *mut and *const, & and &const
closes #33
Diffstat (limited to 'src/parseh.cpp')
-rw-r--r--src/parseh.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parseh.cpp b/src/parseh.cpp
index 6dc9972415..1e931681ce 100644
--- a/src/parseh.cpp
+++ b/src/parseh.cpp
@@ -250,9 +250,9 @@ static Buf *to_zig_type(ParseH *p, CXType raw_type) {
CXType pointee_type = clang_getArrayElementType(raw_type);
Buf *pointee_buf = to_zig_type(p, pointee_type);
if (clang_isConstQualifiedType(pointee_type)) {
- return buf_sprintf("*const %s", buf_ptr(pointee_buf));
+ return buf_sprintf("&const %s", buf_ptr(pointee_buf));
} else {
- return buf_sprintf("*mut %s", buf_ptr(pointee_buf));
+ return buf_sprintf("&%s", buf_ptr(pointee_buf));
}
}
case CXType_Pointer:
@@ -265,9 +265,9 @@ static Buf *to_zig_type(ParseH *p, CXType raw_type) {
pointee_buf = to_zig_type(p, pointee_type);
}
if (clang_isConstQualifiedType(pointee_type)) {
- return buf_sprintf("*const %s", buf_ptr(pointee_buf));
+ return buf_sprintf("&const %s", buf_ptr(pointee_buf));
} else {
- return buf_sprintf("*mut %s", buf_ptr(pointee_buf));
+ return buf_sprintf("&%s", buf_ptr(pointee_buf));
}
}
case CXType_Record: