Skip to content

Commit f140108

Browse files
committed
Remove debug code
1 parent 9649590 commit f140108

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

Modules/main.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ pymain_import_readline(const PyConfig *config)
229229
}
230230

231231

232-
// #define DEBUG_DEDENT
233-
234232
/* Strip common leading whitespace utf encoded string */
235233
PyObject* _utf_8_bytes_dedent(PyObject *bytes){
236234
char *input_data;
@@ -245,12 +243,6 @@ PyObject* _utf_8_bytes_dedent(PyObject *bytes){
245243
}
246244
char *new_data = PyBytes_AsString(new_bytes);
247245

248-
#ifdef DEBUG_DEDENT
249-
fprintf(stderr, "\nSTART DEDENT\n");
250-
fprintf(stderr, "input_data: '%s'\n", input_data);
251-
fprintf(stderr, "nchars: %d\n", nchars);
252-
#endif
253-
254246
// Step 1: Find N = the common number leading whitespace chars
255247

256248
// so we can use the descructive strtok to tokenize the input.
@@ -272,13 +264,6 @@ PyObject* _utf_8_bytes_dedent(PyObject *bytes){
272264
if (num_leading_spaces < num_common_leading_spaces) {
273265
num_common_leading_spaces = num_leading_spaces;
274266
}
275-
#ifdef DEBUG_DEDENT
276-
fprintf(stderr, "==========\n");
277-
fprintf(stderr, "line: '%s'\n", line);
278-
fprintf(stderr, "first_nonspace: '%s'\n", first_nonspace);
279-
fprintf(stderr, "num_common_leading_spaces: '%zu'\n", num_common_leading_spaces);
280-
fprintf(stderr, "num_leading_spaces: '%zu'\n", num_leading_spaces);
281-
#endif
282267
}
283268
line = strtok(NULL, "\n");
284269
}
@@ -315,9 +300,6 @@ PyObject* _utf_8_bytes_dedent(PyObject *bytes){
315300
new_line_len = line_len;
316301
}
317302

318-
#ifdef DEBUG_DEDENT
319-
fprintf(stderr, "line_len: '%zu'\n", line_len);
320-
#endif
321303
// Copy the part of the line we want to keep to the new location
322304
strncpy(curr_dst, new_start_loc, new_line_len);
323305
curr_dst += new_line_len;
@@ -327,13 +309,7 @@ PyObject* _utf_8_bytes_dedent(PyObject *bytes){
327309
// null terminate the string (is this sufficient?)
328310
(*curr_dst) = NULL;
329311

330-
#ifdef DEBUG_DEDENT
331-
fprintf(stderr, "new_data: '%s'\n", new_data);
332-
fprintf(stderr, "\nEND WCS_DEDENT\n");
333-
#endif
334312
return new_bytes;
335-
336-
337313
}
338314

339315

0 commit comments

Comments
 (0)