Skip to content

Commit

Permalink
Merge pull request #16 from frgm/trunk
Browse files Browse the repository at this point in the history
renderers: add _const_ attribute to argument 'src' in lus_*_escape() functions
  • Loading branch information
faelys committed Feb 21, 2016
2 parents 17850e9 + cae4399 commit c418be6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions renderers.c
Expand Up @@ -27,7 +27,7 @@

/* lus_attr_escape • copy the buffer entity-escaping '<', '>', '&' and '"' */
void
lus_attr_escape(struct buf *ob, char *src, size_t size) {
lus_attr_escape(struct buf *ob, const char *src, size_t size) {
size_t i = 0, org;
while (i < size) {
/* copying directly unescaped characters */
Expand All @@ -48,7 +48,7 @@ lus_attr_escape(struct buf *ob, char *src, size_t size) {

/* lus_body_escape • copy the buffer entity-escaping '<', '>' and '&' */
void
lus_body_escape(struct buf *ob, char *src, size_t size) {
lus_body_escape(struct buf *ob, const char *src, size_t size) {
size_t i = 0, org;
while (i < size) {
/* copying directly unescaped characters */
Expand Down
4 changes: 2 additions & 2 deletions renderers.h
Expand Up @@ -28,11 +28,11 @@

/* lus_attr_escape • copy the buffer entity-escaping '<', '>', '&' and '"' */
void
lus_attr_escape(struct buf *ob, char *src, size_t size);
lus_attr_escape(struct buf *ob, const char *src, size_t size);

/* lus_body_escape • copy the buffer entity-escaping '<', '>' and '&' */
void
lus_body_escape(struct buf *ob, char *src, size_t size);
lus_body_escape(struct buf *ob, const char *src, size_t size);



Expand Down

0 comments on commit c418be6

Please sign in to comment.