question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replace C++ with C

See original GitHub issue

Current C++ parts:

  • Chunk store relies on
  • Some parts rely on std::string, which can be replaced by C char[] and related functions

TBD:

  • googletesting is implemented in C++. Other candidates for the testing framework: CUnit, CMocka

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
h1994stcommented, Aug 2, 2020

Yeah, C is also more efficient than C++. I have added this task to TODO, so, probably in the following weeks, I will change the project to pure C.

BTW, Makefile support has been added, and it works correctly. README.md is also updated accordingly, so you can have a try in case I missed anything. : )

CMake still lives in the project just for my personal preference. I will maintain both building scripts, so we can keep both of them.

0reactions
h1994stcommented, Aug 11, 2020

Will reopen this issue, if we decide to replace googletesting

Read more comments on GitHub >

github_iconTop Results From Across the Web

What function is to replace a substring from a string in C?
simplification: you can replace that first for loop with for (count = 1; ins = strstr(ins + rep_len, rep); ++count) {} , then...
Read more >
C program to Replace a word in a text by another given word
The idea is to traverse the original string and count the number of times old word occurs in the string. Now make a...
Read more >
Why not replace C with C++? - Quora
Like a few others pointed out - because C++ is not really a good replacement for C. They are not the same -...
Read more >
replace string in C - gists · GitHub
replace string in C. GitHub Gist: instantly share code, notes, and snippets.
Read more >
C Program to Replace All Occurrence of a Character in a String
In this article, we will show you, How to write a C Program to Replace All Occurrence of a Character in a String...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found