Skip to content

Commit 09ca565

Browse files
Use size_t instead of int in blob internals
1 parent e167e6d commit 09ca565

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

blobstamper/blob.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/******************************************************************************
22
*
3-
* Copyright 2021 Nikolay Shaplov (Postgres Professional)
3+
* Copyright 2021-2023 Nikolay Shaplov (Postgres Professional)
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
2424
#include "stamp.h"
2525

2626

27-
Blob::Blob (char * data_in, int size_in)
27+
Blob::Blob (char * data_in, size_t size_in)
2828
{
2929
data = data_in;
3030
size = size_in;
@@ -42,7 +42,7 @@ Blob::isEmpty ()
4242
void
4343
Blob::Dump()
4444
{
45-
int length = end - begin +1 ;
45+
size_t length = end - begin +1 ;
4646
hexdump(data + begin, length);
4747
}
4848

blobstamper/blob.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/******************************************************************************
22
*
3-
* Copyright 2021 Nikolay Shaplov (Postgres Professional)
3+
* Copyright 2021-2023 Nikolay Shaplov (Postgres Professional)
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -30,11 +30,11 @@ class Blob
3030
{
3131
protected:
3232
char* data;
33-
int size;
34-
int begin;
35-
int end;
33+
size_t size;
34+
size_t begin;
35+
size_t end;
3636
public:
37-
Blob(char * data, int size);
37+
Blob(char * data, size_t size);
3838
bool isEmpty ();
3939
size_t Size();
4040
void Dump();
@@ -55,4 +55,4 @@ class NotImplemented /*An exeption */
5555

5656
};
5757

58-
#endif /*BLOB_H*/
58+
#endif /*BLOB_H*/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy